﻿@model Gman.WebApp.Models.MaterialModel

  <script src="../../Scripts/Binding/StockMaterial.js" type="text/javascript"></script>

    <script type="text/javascript">
        var guid = "@(Model.ID.ToString())";
        var action = "@(Model.Action.ToString())";

        $(document).ready(function () {
            SetupControls();
            SetupActions();

        });


    </script>

       <div style="margin-top: 5px;">
        <div class="DataTop">
            <div class="DataTopLeft">
            </div>
            <div class="DataTopRight">
            </div>
        </div>
        <div class="DataContent">
            <div class="DataContentRight" style="height: 50px;">
                <b>Stock Materiales </b>
                @{ Html.RenderPartial("ToolBar", Model.ToolBar); }
            </div>
        </div>
        <div class="DataBottom">
            <div class="DataBottomLeft">
            </div>
            <div class="DataBottomRight">
            </div>
        </div>
    </div>

    <div class="DataContent">
        <div class="DataContentRight">
            <div class="DataTable">
                <fieldset>
                    <table>
                        <tr>
                            <td style="width: 100px;">
                                <div class="editor-label">
                                    Sede</div>
                            </td>
                            <td style="width: 450px" colspan="5">
                                <div>
                                    @(Html.DropDownListFor(model => model.Material.IDSede, Model.Sedes, new { style = "width: 150px;", propertyname = "Material.IDSede" }))
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 100px;">
                                <div class="editor-label">
                                    Material
                                </div>
                            </td>
                            <td colspan="4">
                                <div>
                                    @(Html.TextBoxFor(model => model.Material.DescMate, new { style = "width: 550px;", propertyname = "Material.DescMate" }))
                                    <img id="btnBuscar" src="../../_Images/Search-icon-16.png" alt="Buscar material"
                                        style="cursor: pointer;" />
                                </div>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 100px;">
                                <div class="editor-label">
                                    Familia</div>
                            </td>
                            <td style="width: 300px">
                                <div>
                                    @(Html.DropDownListFor(model => model.Material.FamiMate, Model.Femilia, new { style = "width: 250px;", propertyname = "Material.FamiMate" }))
                                </div>
                            </td>
                            <td style="width: 100px;">
                                <div class="editor-label">
                                    Sub Familia</div>
                            </td>
                            <td style="width: 450px">
                                <div>
                                    @(Html.DropDownListFor(model => model.Material.SubFamiMate, Model.SubFemilia, new { style = "width: 250px;", propertyname = "Material.SubFamiMate" }))
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 100px;">
                                <div class="editor-label">
                                    Categoria</div>
                            </td>
                            <td style="width: 300px">
                                <div>
                                    @(Html.DropDownListFor(model => model.Material.CatMate, Model.Categoria, new { style = "width: 250px;", propertyname = "Material.CatMate" }))
                                </div>
                            </td>
                            <td style="width: 100px;">
                                <div class="editor-label">
                                    Sub Categoria</div>
                            </td>
                            <td style="width: 450px">
                                <div>
                                    @(Html.DropDownListFor(model => model.Material.SubCatMate, Model.SubCategoria, new { style = "width: 250px;", propertyname = "Material.SubCatMate" }))
                                </div>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </div>
            <div class="DataContent">
                <div class="DataContentRight" style="height: 300px;">
                    <br />
                    <div id="ListarMaterialesDiv">
                        @{ Html.RenderPartial("ListarMateriales", Model); }
                    </div>
                </div>
            </div>
        </div>
    </div>